import Vue from 'vue'
import Vuex from 'vuex'

import categtory from './modules/categtory'
import list from './modules/list'

Vue.use(Vuex)

export default new Vuex.Store({
  modules: {
    categtory,
    list
  },
  getters: {
    categoryList: state => state.categtory.categoryList,
    currentCategory: state => state.categtory.currentCategory,
    currentList: state => state.list.allData[state.categtory.currentCategory] || []
  }
})
